﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KiDS_Bootstrap
{
	/// <summary>
	/// Klasa koja predstavlja REGISTER_SERVENT_COMMAND
	/// </summary>
	public class RegisterServentCommand : Command
	{
		private int _code;
		private string _message;
		private string p;

		public unsafe RegisterServentCommand(SOCKET socket, int code, string message)
		 : base(socket) {
			 _code = code;
			_message = message;
		}

		public unsafe RegisterServentCommand(SOCKET socket)
		 : base(socket){}

		public unsafe RegisterServentCommand(SOCKET socket, string p)
			: base(socket){
			this.p = p;
		}

		public override void DoCommmand()
		{
			Native.SendMessage(_code + " " + _message, _socket);
			Native.closesocket(_socket);
		}
	}
}
